package com.imageim.yimirror.common.broadcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.imageim.yimirror.ui.activity.BannerActivity;

/**
 * Created by Administrator on 2017/12/27.
 */

public class BootBroadcastReceiver extends BroadcastReceiver {

    private static final String TAG = "BootBroadcastReceiver";

    public static final String ACTION = "android.intent.action.BOOT_COMPLETED";
    private static final int SUPPORT_BOOT_START = 0;
    private static final int NOT_SUPPORT_BOOT_START = 1;


    @Override
    public void onReceive(Context context, Intent intent) {
        //        Log.d(TAG, "onReceive: ");

        if (ACTION.equals(intent.getAction())) {
            Intent mainActivityIntent = new Intent(context, BannerActivity.class);  // 要启动的Activity
            mainActivityIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            context.startActivity(mainActivityIntent);
        }

    }
}


